{extend name="base/main" /}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="ibox float-e-margins">
		<div class="ibox-title">
			<h5>内容管理 / 文章管理</h5>
			<div class="ibox-tools">
				<a class="collapse-link">
					<i class="fa fa-chevron-up"></i>
				</a>
				<a class="close-link">
					<i class="fa fa-times"></i>
				</a>
			</div>
		</div>
		<div class="ibox-content">
			<div class="row row-lg">
				<div class="col-sm-12">
					<div class="search-area" id="toggle">
						<form class="form-horizontal m-t" action="{:url('article/index')}" method="get">
							<div class="form-group">
								<label class="col-sm-1 control-label">请输入值搜索：</label>
								<div class="col-sm-2">
									<input name="name" type="text" class="form-control">
									<span id="cname-error" class="help-block m-b-none"><i class="fa fa-info-circle"></i>请输入文章标题进行搜索</span>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-1 control-label">按照状态搜索：</label>
								<div class="col-sm-2">
									<select name="status" class="form-control">
										<option value="">---状态---</option>
										<option value="1">启用</option>
										<option value="2">禁用</option>
									</select>
									<span id="cname-error" class="help-block m-b-none"><i class="fa fa-info-circle"></i>请选择状态值</span>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-2 col-sm-offset-1">
									<button class="btn btn-primary" type="submit">搜索</button>
									<a href="{:url('article/index')}" class="btn btn-default">撤销搜索</a>
								</div>
							</div>
						</form>
					</div>
					<div class="fixed-table-toolbar">
						<div class="bars pull-left">
							<a href="javascript:void(0);" class="btn btn-sm btn-primary search-toggle"><i class="fa fa-search"></i>&nbsp;&nbsp;搜索</a>
							<a href="{:url('article/add')}" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i>&nbsp;&nbsp;添加</a>
							<a href="#" class="btn btn-sm btn-primary ajax-post" target-form="id" url="{:url('article/edit')}"><i class="fa fa-edit"></i>&nbsp;&nbsp;编辑</a>
							<a href="#" class="btn btn-sm btn-primary confirm ajax-post" target-form="id" url="{:url('article/remove')}"><i class="fa fa-close"></i>&nbsp;&nbsp;删除</a>
							<a href="javascript:void(0);" class="btn btn-sm btn-primary confirm ajax-post" target-form="id" url="{:url('article/state',['status'=>1])}"><i class="fa fa-check"></i>&nbsp;&nbsp;启用</a>
							<a href="javascript:void(0);" class="btn btn-sm btn-primary confirm ajax-post" target-form="id" url="{:url('article/state',['status'=>2])}"><i class="fa fa-ban"></i>&nbsp;&nbsp;禁用</a>
						</div>
					</div>
					<div class="example-wrap">
						<div class="example">
							<table class="table table-hover">
								<thead>
									<tr>
										<th><input type="checkbox" class="i-checks check-all"></th>
										<th>编号</th>
										<th>文章分类</th>
										<th>文章封面</th>
										<th>文章标题</th>
										<th>是否推荐</th>
										<th>浏览量</th>
										<th>评论数</th>
										<th>状态</th>
										<th>最后操作时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									{volist name="list" id="vo"}
									<tr class="tbody">
										<td><input type="checkbox" class="i-checks ids" name="id[]" value="{$vo.id}"/></td>
										<td>{$vo.id}</th>
										<td>{$vo.category_id}</th>
										<td><img src="<?php echo get_img_url($vo['cover'],40,40);?>" /></th>
										<td>{$vo.title}</th>
										<td><?php if($vo['isrecomm'] == '2'){ ?> <i class="fa fa-check text-navy"></i> <?php }else{ ?> <i class="fa fa-check fa-close"></i> <?php } ?></td>
										<td>{$vo.view}</td>
										<td>{$vo.comment}</th>
										<td><?php if($vo['status'] == '1'){ ?> <i class="fa fa-check text-navy"></i> <?php }else{ ?> <i class="fa fa-check fa-close"></i> <?php } ?></td>
										<td>{:date('Y-m-d H:i:s',$vo['utime'])}</td>
										<td>
											<a href="{:url('article/edit',['id'=>$vo['id']])}" class="btn btn-xs btn-white"><i class="fa fa-pencil"></i> 编辑 </a>
											<a href="javascript:void(0);" class="btn btn-xs btn-white confirm tabledel ajax-post" target-form="id" url="{:url('article/remove',['id'=>$vo['id']])}"><i class="fa fa-times-circle"></i> 删除 </a>
										</td>
									</tr>
									{/volist}
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>	
	</div>	
</div>
{/block}